﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace NHModel.Entities
{
    public class TeacherInfo
    {
        #region Member Variables

        protected int _id;
        protected string _userName;
        protected string _passWord;
        protected string _email;
        protected string _address;
        protected string _tel;
        protected string _realName;
        protected string _interesting;
        protected int _isActive;
        protected DateTime _createTime;
        protected DateTime _deleteTime;
        protected DateTime _updateTime;


        #endregion

        #region Constructors

        public TeacherInfo() { }

        public TeacherInfo(string userName, string passWord, string email, string address, string tel, string realName, string interesting, int isActive, DateTime createTime, DateTime deleteTime, DateTime updateTime)
        {
            this._userName = userName;
            this._passWord = passWord;
            this._email = email;
            this._address = address;
            this._tel = tel;
            this._realName = realName;
            this._interesting = interesting;
            this._isActive = isActive;
            this._createTime = createTime;
            this._deleteTime = deleteTime;
            this._updateTime = updateTime;
        }

        #endregion

        #region Public Properties

        public virtual int Id
        {
            get { return _id; }
            set { _id = value; }
        }

        public virtual string UserName
        {
            get { return _userName; }
            set
            {
                if (value != null && value.Length > 20)
                    throw new ArgumentOutOfRangeException("Invalid value for UserName", value, value.ToString());
                _userName = value;
            }
        }

        public virtual string PassWord
        {
            get { return _passWord; }
            set
            {
                if (value != null && value.Length > 20)
                    throw new ArgumentOutOfRangeException("Invalid value for PassWord", value, value.ToString());
                _passWord = value;
            }
        }

        public virtual string Email
        {
            get { return _email; }
            set
            {
                if (value != null && value.Length > 20)
                    throw new ArgumentOutOfRangeException("Invalid value for Email", value, value.ToString());
                _email = value;
            }
        }

        public virtual string Address
        {
            get { return _address; }
            set
            {
                if (value != null && value.Length > 16)
                    throw new ArgumentOutOfRangeException("Invalid value for Address", value, value.ToString());
                _address = value;
            }
        }

        public virtual string Tel
        {
            get { return _tel; }
            set
            {
                if (value != null && value.Length > 15)
                    throw new ArgumentOutOfRangeException("Invalid value for Tel", value, value.ToString());
                _tel = value;
            }
        }

        public virtual string RealName
        {
            get { return _realName; }
            set
            {
                if (value != null && value.Length > 15)
                    throw new ArgumentOutOfRangeException("Invalid value for RealName", value, value.ToString());
                _realName = value;
            }
        }

        public virtual string Interesting
        {
            get { return _interesting; }
            set
            {
                if (value != null && value.Length > 16)
                    throw new ArgumentOutOfRangeException("Invalid value for Interesting", value, value.ToString());
                _interesting = value;
            }
        }

        public virtual int IsActive
        {
            get { return _isActive; }
            set { _isActive = value; }
        }

        public virtual DateTime CreateTime
        {
            get { return _createTime; }
            set { _createTime = value; }
        }

        public virtual DateTime DeleteTime
        {
            get { return _deleteTime; }
            set { _deleteTime = value; }
        }

        public virtual DateTime UpdateTime
        {
            get { return _updateTime; }
            set { _updateTime = value; }
        }


        #endregion

    }
}
